package day05;

/**
 * 输出100以内所有质数
 * 质数:素数，只能被1和它本身整除的自然数
 * @author Smartloe
 * @create 2021-04-04 16:55
 */
public class PrimeNumberTest {
    public static void main(String[] args) {
        boolean isFlag = true;
        for (int i = 2; i <= 100; i++) {
//            boolean isFlag = true;
            for (int j = 2; j < i; j++) {
                if (i%j == 0){
                    isFlag = false;
                }
            }
            if (isFlag == true){
                System.out.println(i);
            }
            isFlag = true;
        }
    }
}
